﻿<Window x:Class="QinTools.View.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i18n="clr-namespace:QinTools.I18n"
        xmlns:vm="clr-namespace:QinTools.ViewModel"
        xmlns:v="clr-namespace:QinTools.View"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"  
        Title="{x:Static i18n:UI.WindowTitle}" 
        DataContext="{x:Static vm:MainViewModel.Instance}">
    <Window.InputBindings>
        <KeyBinding Command="{Binding NewCharacterCommand}" Gesture="CTRL+N" />
        <KeyBinding Command="{Binding OpenCharacterCommand}" Gesture="CTRL+O" />
        <KeyBinding Command="{Binding SaveCharacterCommand}" Gesture="CTRL+S" />
        <KeyBinding Command="{Binding ExitRequestedCommand}" Gesture="ALT+F4" />
        <KeyBinding Command="{Binding HelpCommand}" Key="F1" />
        <KeyBinding Command="{Binding SaveAllCharactersCommand}" Gesture="CTRL+SHIFT+S" />
    </Window.InputBindings>
    <DockPanel>
        <Menu DockPanel.Dock="Top" KeyboardNavigation.TabNavigation="None">
            <MenuItem Header="{x:Static i18n:UI.FileMenuHeader}">
                <MenuItem Header="_New Character" 
                          Command="{Binding NewCharacterCommand}" 
                          InputGestureText="Ctrl+N" />
                <MenuItem Header="_Open" 
                          Command="{Binding OpenCharacterCommand}" />
                <Separator />
                <MenuItem Command="{Binding SaveCharacterCommand}"                           
                          InputGestureText="Ctrl+S">
                    <MenuItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <AccessText>_S</AccessText>
                            <TextBlock Text="ave " />
                            <TextBlock Text="{Binding Path=CurrentDocument.Title}" />
                        </StackPanel>
                    </MenuItem.Header>
                </MenuItem>
                <MenuItem Command="{Binding SaveCharacterAsCommand}">
                    <MenuItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Save "/>
                            <TextBlock Text="{Binding Path=CurrentDocument.Title}" />
                            <TextBlock Text=" "/>
                            <AccessText>_A</AccessText>
                            <TextBlock>s...</TextBlock>
                        </StackPanel>
                    </MenuItem.Header>
                </MenuItem>
                <MenuItem Header="Save A_ll"
                          Command="{Binding SaveCharacterAsCommand}"
                          InputGestureText="Ctrl+Shift+S" />
                <MenuItem Header="E_xit" Command="{Binding ExitRequestedCommand}" />
            </MenuItem>
            <MenuItem Header="_Window">
                
            </MenuItem>
            <MenuItem Header="_Help">
                <MenuItem Header="Contents" 
                          Command="{Binding HelpCommand}"
                          InputGestureText="F1" />
                <MenuItem Header="_About" Command="{Binding HelpAboutCommand}" />
            </MenuItem>
        </Menu>
        <ad:DockingManager x:Name="uxDocumentManager">
            <ad:ResizingPanel Orientation="Horizontal">
                <ad:DocumentPane x:Name="uxDocuments">

                </ad:DocumentPane>
                <ad:DockablePane ad:ResizingPanel.ResizeWidth=".25*">
                    <ad:DockableContent Title="Test Pane" DockableStyle="Dockable"
                                        x:Name="uxTestPane">
                        <TextBlock>Testy!</TextBlock>
                    </ad:DockableContent>
                </ad:DockablePane>
            </ad:ResizingPanel>
        </ad:DockingManager>
    </DockPanel>
</Window>
